﻿using System;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace NASA.BeAMartian.Views.Explore
{
    public partial class LocationInfo : Canvas
    {

        public LocationInfo()
        {
            InitializeComponent();
            Hide();
        }

        /// <summary>
        /// Show the control and fade in the background.
        /// </summary>
        public void Show(RegionType location, BeAMartian.Views.Explore.MarsAtlas mp)
        {
            _cityInfo.Text = location.Description();
            if (!mp._regions.ContainsKey(location.Description()))
                return;

            string regText = mp._regions[location.Description()];
            _citySubTitle.Text = regText.Substring(0, regText.IndexOf("||"));

            Visibility = Visibility.Visible;
        }

        /// <summary>
        /// Hide the control.
        /// </summary>
        public void Hide()
        {
            Visibility = Visibility.Collapsed;
        }
    }

}
	